﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Principal.Master" AutoEventWireup="true"
    CodeBehind="DetalheImovel.aspx.cs" Inherits="JA.Web.Apresentacao.DetalheImovel" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        input[type=image][disabled]
        {
            cursor: default;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderDormitorios" runat="server">
    <asp:LinkButton ID="lbVoltar" runat="server" OnClick="lbVoltar_Click" ForeColor="White">Clique aqui para voltar para a pesquisa de im&oacute;veis</asp:LinkButton>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="max-width: 1029px;" cellspacing="10">
        <tr>
            <td valign="top">
                <!-- fotos -->
                <table>
                    <tr>
                        <td align="center" valign="middle" style="width: 300px; border: dashed 1px #E0E0E0;">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td valign="middle" style="width:28px; min-width:28px; max-width:28px;">
                                        <asp:ImageButton ID="imgbFotoAnterior" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/arrowLeft.png"
                                            runat="server" OnClick="changeImage" Style="float: left;" Visible="false" />
                                    </td>
                                    <td>
                                        <asp:HiddenField ID="hfIdImovelXFoto" runat="server" />
                                        <asp:ImageButton ID="ImageButton4" runat="server" Width="300" Height="168" OnClick="ButtonFoto_Click" />
                                    </td>
                                    <td valign="middle" style="width:28px; min-width:28px; max-width:28px;">
                                        <asp:ImageButton ID="imgbFotoSeguinte" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/arrowRight.png"
                                            runat="server" OnClick="changeImage" Style="float: right;" Visible="false" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top" style="border: solid 1px #E0E0E0;">
                            <asp:Repeater ID="RepeaterFotos" runat="server">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl='<%#"~/DownFoto.aspx?idImovelXFoto="+Eval("idImovelXFoto")+"&type=small" %> '
                                        Width="60" Height="33" OnClick="changeImage" CommandArgument='<%#Eval("idImovelXFoto").ToString()%>' />
                                </ItemTemplate>
                            </asp:Repeater>
                        </td>
                    </tr>
                </table>
            </td>
            <td>
                <!-- descricao, detalhe e contato, caracteristica, area comum -->
                <table>
                    <tr>
                        <!-- descricao -->
                        <td valign="top" align="left" style="width: 400px;">
                            <table width="100%">
                                <tr>
                                    <td align="right">
                                        <table>
                                            <tr>
                                                <td style="font-family: Verdana; font-size: 7pt; font-weight: bold; color: #000060;">
                                                    C&oacute;digo&nbsp;
                                                </td>
                                                <td align="center" style="border: solid 1px; font-family: Verdana; font-size: 10pt;
                                                    font-weight: bold; color: #dd6d00; width: 80px; text-align: center; background-color: Black;
                                                    color: White;">
                                                    <div>
                                                        <asp:Literal ID="ltlIdImovel" runat="server" /></div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <asp:Repeater ID="RepeaterDetalhes" runat="server">
                                <ItemTemplate>
                                    <div style="font-family: Verdana; font-weight: bold; font-size: <%#Eval("Key").ToString().Equals("Titulo") ? "14pt" : "11pt"%>;
                                        color: <%#Eval("Key").ToString().Equals("Titulo") ? "#FF6d00" : Eval("Key").ToString().Equals("Bairro") ? "Gray" : "Black" %>;
                                        padding-bottom: 5px;">
                                        <%# Eval("Value") %>
                                    </div>
                                </ItemTemplate>
                            </asp:Repeater>
                            <br />
                            <div style="width: 400px; min-height: 100px; border: solid 3px #E0E0E0; color: #FF6d00;
                                font-family: Verdana; font-size: 11pt; font-weight: bold; padding: 3px 3px 3px 3px;">
                                <asp:Literal ID="ltlDesc" runat="server"></asp:Literal>
                            </div>
                        </td>
                        <!-- detalhes e Contato-->
                        <td valign="top">
                            <table>
                                <asp:Repeater ID="RepeaterImovel" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:Label ID="Label1" runat="server" Text="::" Font-Bold="true" ForeColor="Red"
                                                    Font-Size="7pt"></asp:Label>
                                            </td>
                                            <td align="right" style="border: dashed 1px #E0E0E0; font-family: Verdana; font-size: 9pt;
                                                font-weight: bold; color: Black;">
                                                <%# Eval("Key") %>
                                            </td>
                                            <td align="left" style="border: dashed 1px #E0E0E0; font-family: Verdana; font-size: 9pt;
                                                font-weight: bold; color: Red;">
                                                <%# Eval("Value") %>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </table>
                            <br />
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/contato.png"
                                OnClick="btContatoClick" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <!-- caracteristicas e area comum -->
                        <td colspan="2" align="left">
                            <table width="100%">
                                <tr>
                                    <!-- caracteristicas -->
                                    <td valign="top" align="left" style="font-family: Verdana; font-size: 9pt; font-weight: bold;
                                        border-left: dashed 1px #E0E0E0; border-right: dashed 1px #E0E0E0;">
                                        <div style="color: Red;">
                                            Caracter&iacute;sticas:</div>
                                        <br />
                                        <asp:Repeater ID="RepeaterCaracteristicas" runat="server">
                                            <HeaderTemplate>
                                                <table border="0" cellpadding="0" cellspacing="1">
                                                    <tr>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <%# (Container.ItemIndex!=0 && Container.ItemIndex%2==0?"</tr><tr>":"") %>
                                                <td style="color: Black;">
                                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/bullet.png" />
                                                    <%#DataBinder.Eval(Container.DataItem, "caracteristica")%>
                                                </td>
                                            </ItemTemplate>
                                            <SeparatorTemplate>
                                            </SeparatorTemplate>
                                            <FooterTemplate>
                                                </tr> </table>
                                            </FooterTemplate>
                                        </asp:Repeater>
                                    </td>
                                    <!-- area comum -->
                                    <td valign="top" align="left" style="font-family: Verdana; font-size: 9pt; font-weight: bold;
                                        border-right: dashed 1px #E0E0E0;">
                                        <div style="color: Red;">
                                            &Aacute;reas comuns:</div>
                                        <br />
                                        <asp:Repeater ID="RepeaterAreaComuns" runat="server">
                                            <HeaderTemplate>
                                                <table border="0" cellpadding="0" cellspacing="1">
                                                    <tr>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <%# (Container.ItemIndex!=0 && Container.ItemIndex%2==0?"</tr><tr>":"") %>
                                                <td style="color: Black;">
                                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/bullet2.png" />
                                                    <%#DataBinder.Eval(Container.DataItem,"areaComum") %>
                                                </td>
                                            </ItemTemplate>
                                            <SeparatorTemplate>
                                            </SeparatorTemplate>
                                            <FooterTemplate>
                                                </tr> </table>
                                            </FooterTemplate>
                                        </asp:Repeater>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <hr />
    <asp:Panel ID="PanelFoto" runat="server" Visible="false">
        <div style="position: fixed; top: 0; left: 0; background-color: Gray; filter: alpha(opacity=50);
            opacity: .5; width: 100%; height: 100%; vertical-align: middle; text-align: center;">
        </div>
        <div style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; font-size: medium;
            font-weight: bold;">
            <table style="width: 100%; height: 100%;">
                <tr>
                    <td style="text-align: center; vertical-align: middle;">
                        <center>
                            <asp:Table ID="Table1" runat="server" CellPadding="0" CellSpacing="0">
                                <asp:TableRow>
                                    <asp:TableCell HorizontalAlign="Right">
                                        <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/App_Themes/Padrao/imagens/masterpage/fechar.png"
                                            OnClick="ButtonFotoClose_Click" />
                                    </asp:TableCell>
                                </asp:TableRow>
                                <asp:TableRow ID="tbrow" runat="server">
                                    <asp:TableCell ID="tbcell" runat="server" BackColor="#707070" Style="vertical-align: middle;
                                        text-align: center; padding: 5px 10px 5px 10px;">
                                        <center>
                                            <asp:Image ID="Image3" runat="server" Style="max-width: 800px; max-height: 600px;" /><br />
                                            <asp:Label ID="Label2" runat="server" Text="" Style="color: White;"></asp:Label>
                                    </asp:TableCell>
                                </asp:TableRow>
                            </asp:Table>
                            <asp:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="tbcell"
                                Radius="8">
                            </asp:RoundedCornersExtender>
                        </center>
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</asp:Content>
